package net.hockeyapp.android.utils;

import android.content.SharedPreferences.Editor;
import android.os.Build.VERSION;

public class PrefsUtil {
    public static void applyChanges(Editor editor) {
        if (applySupported().booleanValue()) {
            editor.apply();
        } else {
            editor.commit();
        }
    }

    public static Boolean applySupported() {
        try {
            boolean z;
            if (VERSION.SDK_INT >= 9) {
                z = true;
            } else {
                z = false;
            }
            return Boolean.valueOf(z);
        } catch (NoClassDefFoundError e) {
            return Boolean.valueOf(false);
        }
    }
}
